<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="content">
        <button class="btn">hover me</button>
        <button class="btn btn2">hover me</button>
        <button class="btn btn3">hover me</button>
    </div>
</body>
<style>
    .content{
        text-align: center;
        /* margin: auto 0; */
    }
    .btn{
        padding: 10px;
        width: 100px;
        height: 40px;
        color: #48dbfb;
        background: none;
        border: 1px solid #48dbfb;
        outline:none;
        position: relative;
        overflow: hidden;
        font-size: 15px;
        font-weight: 600;
    }

    .btn::before{
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 0%;
        border-radius:60% 60%  0 0;
        bottom: 0;
        transition: 0.8S;
        background-color: #48dbfb;
        z-index: -1;
    }
    
    .btn2::before{
        border-radius:0 0 50% 50%;
        top: 0px;
    }

    .btn3::before{
        bottom: 0px;
    }

    .btn:hover{
        color: white;
        transition: 0.8S;
    }

    .btn:hover::before{
        /* 过渡实现 */
        height: 180%;
        border-radius: 0;
        transition: 0.8S;
    }

    .btn3:hover::before{
        /* 动画实现 */
        animation-duration: 1.8s; 
        animation-fill-mode: forwards;
        animation-name: full;
        
    }
    @keyframes full {
        0%{
            height: 0%;
            border-radius: 60% 60% 0 0;
        }
        100%{
            border-radius: 0%;
            height: 180%;
        }
       
    }
</style>
</html>